# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=piep
pkgdesc='Bringing the power of python to stream editing'
pkgver=0.9.2
pkgrel=6
arch=("any")
url="https://github.com/gfxmonk/piep"
license=("GPL")
depends=('python-pygments')
makedepends=('python-setuptools')
checkdepends=('python-nose')
source=("https://github.com/gfxmonk/$pkgname/archive/version-$pkgver.tar.gz"
         piep-python3.8.patch)
sha512sums=('9d36c31a90fbdc43ff1c7f66a6496290305c5402d7020d2e559b84b9eb796e7945f12c38d5d4167a3518d2664128403e34102445bf60475d21122de73983a5f9'
            '3193b38ed2249c16758388d306aa9a8d1adcf345e12fb1c6edbe11b9d2279a8340a65040c373a425f80288a54e92750545c7ba708ada02cc44bd799c1333fcb6')

prepare() {
  cd $pkgname-version-$pkgver
  patch -p1 -i ../piep-python3.8.patch
}

build() {
  cd $pkgname-version-$pkgver
  python setup.py build
}

check() {
  cd $pkgname-version-$pkgver
  python setup.py nosetests
}

package() {
  cd $pkgname-version-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
}

# vim:set ts=2 sw=2 et:
